package com.cn.pack.controller;

import com.cn.pack.service.HelloFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/hello")
public class HelloFeignController {

    @Autowired
    private HelloFeignService helloFeignService;

    @RequestMapping(path = "/say")
    public String say(@RequestParam("username") String username) {
        String say = helloFeignService.say(username);
        System.out.println(say);
        return say;
    }
}
